home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Informant Complete 1995 - 2000
/
Delphi Informant Complete 1995 to 2000.iso
/
Delphi Informant Magazine Complete Works SOURCE CODE 1998.rar
/
1998
/
Jan
/
di9801kw
/
PropExpl.dpr
< prev
next >
Wrap
Text File
|
1997-07-29
|
3KB
|
110 lines
library PropExpl;
{
Property Explorer.
Locates properties names and/or contents that have a given value.
Written by Keith Wood, 20 March 1997.
Version 1.0
}
uses
ShareMem,
Forms,
WinTypes,
ExptIntf,
ToolIntf,
VirtIntf,
SysUtils,
WinProcs,
PropExp1 in 'PropExp1.pas' {frmPropExplorerExpert};
type
TPropExplorerExpert = class(TIExpert)
function GetName: string; override;
function GetMenuText: string; override;
function GetStyle: TExpertStyle; override;
function GetState: TExpertState; override;
function GetIDString: string; override;
procedure Execute; override;
end;
{ TPropExplorerExpert -------------------------------------------------------- }
{ Return the name of the property explorer expert }
function TPropExplorerExpert.GetName: string;
begin
Result := 'Property Explorer';
end;
{ Return the text to appear on the menu }
function TPropExplorerExpert.GetMenuText: string;
begin
Result := 'Property E&xplorer...';
end;
{ Return the style of the expert - standard - add to Help menu }
function TPropExplorerExpert.GetStyle: TExpertStyle;
begin
Result := esStandard;
end;
{ Return the expert's state }
function TPropExplorerExpert.GetState: TExpertState;
begin
Result := [esEnabled];
end;
{ Return a unique id for the expert }
function TPropExplorerExpert.GetIDString: string;
begin
Result := 'KWood.PropertyExplorer';
end;
{ And invoke the expert }
procedure TPropExplorerExpert.Execute;
begin
try
PropExplorerExpert;
except
ToolServices.RaiseException(ReleaseException);
end;
end;
{ Experts interface ---------------------------------------------------------- }
{ Tidy up }
procedure DoneExpert; export;
begin
{ Put any general destruction code here. Note that the Delphi IDE
will destroy any experts which have been registered. }
end;
{ Initialise the expert and register it with Delphi }
function InitExpert(ToolServices: TIToolServices;
RegisterProc: TExpertRegisterProc;
var Terminate: TExpertTerminateProc): Boolean; export; stdcall;
begin
{ Make sure we're the first and only instance }
Result := (ExptIntf.ToolServices = nil);
if not Result then
Exit;
ExptIntf.ToolServices := ToolServices;
if ToolServices <> nil then
Application.Handle := ToolServices.GetParentHandle;
Terminate := DoneExpert;
{ Register the expert }
RegisterProc(TPropExplorerExpert.Create);
end;
{ Export the required functions for external use }
exports
InitExpert name ExpertEntryPoint resident;
begin
end.